use std::{
    fs::File,
    io::{BufRead, BufReader},
};

pub fn read_lines_range(file_path: &str, start_line: u16, end_line: u16) -> String {
    let mut content = String::default();
    if let Ok(file) = File::open(file_path) {
        let reader = BufReader::new(file);
        for (index, line) in reader.lines().enumerate() {
            let line_num = (index + 1) as u16;
            if line_num > end_line {
                break;
            }
            if line_num >= start_line {
                let text = line.unwrap_or_default();
                if !text.to_lowercase().starts_with("content-") {
                    content.push_str(&text);
                }
            }
        }
    }
    content
}
